<template>
  <MyEcharts :options="chartOptions" width="100%" height="500px" @chart-click="handleChartClick" />
</template>

<script setup>
import { ref } from 'vue'
import MyEcharts from '@/components/MyEcharts/MyEcharts.vue'

const chartOptions = ref({
  title: { text: '示例图表' },
  xAxis: { data: ['A', 'B', 'C', 'D', 'E'] },
  yAxis: {},
  series: [
    {
      type: 'bar',
      data: [10, 22, 28, 43, 49]
    }
  ]
})

const handleChartClick = (params) => {
  console.log('图表点击事件:', params)
}
</script>
<style lang="scss" scoped></style>
